package com.weixing.mall.provider.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.weixing.mall.provider.model.domain.AgentCommission;
import com.weixing.mall.provider.model.query.AgentCommissionQuery;
import com.weixing.mall.provider.model.vo.AgentCommissionVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

/**
 * <p>
 * 代理商模块-代理商佣金表 Mapper 接口
 * </p>
 *
 * @author Small
 * @since 2019-11-18
 */
public interface AgentCommissionMapper extends BaseMapper<AgentCommission> {

    IPage<AgentCommissionVo> selectListOfPage(@Param("pg") Page page, @Param("qs")AgentCommissionQuery agentCommissionQuery);

    IPage<AgentCommissionVo> selectAgentCommsOfPage(@Param("pg") Page page, @Param("agentId")long agentId);

    BigDecimal countComm(@Param("agentId")long agentId, @Param("month")String month);
}
